22. Calculating Accelerations in 2D Exercise
Rotation Rates to Moments and Thrusts
def get_thrust_and_moment(self):
"""Helper function which calculates and returns the
collective thrust and the moment about the X axis"""
f1 = self.k_f * self.omega_1 ** 2
f2 = self.k_f * self.omega_2 ** 2
# c is often used to indicate "collective" thrust
c = f1 + f2
M_x = (f1 - f2) * self.l
return c, M_x
In the exercise below you'll probably want to use this function as you implement three new methods in the Drone2D
class.
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity, so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a